import {
    Entity,
    Column,
    PrimaryGeneratedColumn,
    CreateDateColumn,
    UpdateDateColumn,
  } from 'typeorm';
  
  @Entity('mode')
  export class Mode {
    @PrimaryGeneratedColumn({
      type: 'int',
      comment: '主键id',
    })
    mid: number;
  
    @Column('varchar', {
      nullable: false,
      unique:true,
      comment: '模式名称',
    })
    title: string;
  
    @CreateDateColumn({
      type: 'timestamp',
      name: 'created_at',
      comment: '创建时间',
    })
    createdAt: Date;
  
    @UpdateDateColumn({
      type: 'timestamp',
      name: 'updated_at',
      comment: '最后更新时间',
    })
    updatedAt: Date;
  }
  